Skip to main content

Enums and DTOs

Enums

NotificationCycleType

Defines the cycle stage for sending rating notifications.

ValueDescription
initialThe first notification sent.
reminder1First reminder after the initial notification if no rating was done.
reminder2Second reminder if no rating to raminder1 notifications.

NotificationStatus

Represents the current status of a rating notification.

ValueDescription
opnNotification is open and awaiting action.
rtdRating has been completed by the patient.
cxlNotification has been cancelled (When patient doesn't rate past 7 days post initial notification).

DTOs

ApproveRatingDto

Used for approving or rejecting a single rating.

PropertyTypeDescription
agent_idnumberID of the agent performing the action.
booking_idstringBooking ID whose rating is being evaluated.
status'approve' | 'reject'Status to approve or reject rating.

BookingStatusDto

Used to represent the status (approve/reject) of a booking.

PropertyTypeDescription
booking_idstringID of the booking.
status'approve' | 'reject'Status to apply to the booking.

MultipleApproveRatingDto

Used for approving or rejecting ratings for multiple bookings by an agent.

PropertyTypeDescription
agent_idnumberID of the agent performing the approvals.
ratingsBookingStatusDto[]List of bookings with their respective approval statuses.

CreateRatingDto

Used when a patient submits a rating for a completed booking.

PropertyTypeDescription
patient_idnumberID of the patient submitting the rating.
booking_idstringBooking ID of appoinment being rated. This is emrAppointmentId for external appoinments.
overall_ratingnumber (1.0 to 5.0)Overall experience rating. Must be between 1.0 and 5.0 (max 1 decimal place).
provider_ratingnumber (1.0 to 5.0)Rating for the service provider. Must be between 1.0 and 5.0.
staff_ratingnumber (1.0 to 5.0)Rating for staff performance. Must be between 1.0 and 5.0.
clinic_ratingnumber (1.0 to 5.0)Rating for the clinic/facility. Must be between 1.0 and 5.0.
commentsstring (optional)Additional comments from the patient.
tagsstring (optional)Keywords or tags related to the rating.
status'pending' | 'approved' | 'rejected' (optional)Status of the rating entry (defaults to 'pending').

GetProviderRatingsDto

Used to query provider ratings with optional filters.

PropertyTypeDescription
limitnumber (optional)Maximum number of rating results to return. Defaults to 1.
includeCommentsboolean (optional)Whether to include patient comments in the rating results.
deepStatsboolean (optional)Whether to include deep statistical insights in the result. Accepts boolean values, even as strings (e.g., 'true', 'false').

NotificationDto

Represents the payload used when sending a notification related to an appointment. This is the format appointment completed status sync returns, used to trigger notifications.

PropertyTypeDescription
appointmentIdnumberThe ID of the appointment associated with the notification.
isInternalbooleanIndicates whether the notification is internal (true) or external (false).

RatingAppointmentDto

Represents the structure of a single detailed rating returned in responses.

PropertyTypeDescription
idnumberUnique ID of the rating.
overallRatingnumberOverall score given by the patient.
providerRatingnumberRating specific to the provider.
staffRatingnumberRating of the staff involved.
clinicRatingnumberRating of the clinic/facility.
commentsstring | nullOptional comment provided by the patient.
statusstringRating status: 'pending', 'approved', or 'rejected'.
datetimeRatedDateTimestamp when the rating was submitted.
patientpatientDtoThe patient who submitted the rating.
appointmentAppointmentDtoThe appointment associated with the rating.
businessLocationBusinessLocationDtoThe business location where the appointment took place.
agentAgentDtoThe provider/agent associated with the appointment.

AppointmentDto

Represents the basic details of an appointment tied to a rating.

PropertyTypeDescription
bookingIdstringUnique identifier of the booking.
startDatetimeDateDate and time when the appointment starts.

PaginationMetaDto

Describes pagination metadata for paginated responses.

PropertyTypeDescription
totalnumberTotal number of records.
pagenumberCurrent page number.
limitnumberNumber of records per page.
totalPagesnumberTotal number of available pages.

UnapprovedRatingsResponseDto

Returns a paginated list of unapproved ratings.

PropertyTypeDescription
dataRatingAppointmentDto[]Array of unapproved rating records.
paginationPaginationMetaDtoMetadata for the current page result.

RatingComments

Represents a single rating comment with associated metadata.

PropertyTypeDescription
commentstringTextual feedback provided by the patient.
ratingnumberRating score for this particular comment.
datetime_ratedDateDate and time the rating was submitted.
patientobjectBasic info about the patient (first and last name).
patient.firstNamestringpatient's first name.
patient.lastNamestringpatient's last name.

DeepStats

Provides a breakdown of how many ratings fell into each star category.

PropertyTypeDescription
total5StarnumberTotal number of 5-star ratings.
total4StarnumberTotal number of 4-star ratings.
total3StarnumberTotal number of 3-star ratings.
total2StarnumberTotal number of 2-star ratings.
total1StarnumberTotal number of 1-star ratings.

ProviderRatingsDto

Represents summarized rating data for a specific provider (agent), optionally including comments and rating breakdown.

PropertyTypeDescription
agentIdnumberThe unique identifier of the agent.
averageRatingnumberAverage rating score, rounded to one decimal place.
overallCountnumberTotal number of ratings submitted for this agent.
commentsRatingComments[] | undefinedOptional list of patient comments.
deepStatsDeepStats | undefinedOptional breakdown of rating distribution.